Help!!! Caculate working hours.

Dear friends

I had a problerm with caculating.

THis is only part so i can select hand by hand.

but there are so many people and different months,

what shou i do?


THank you very much.User uploaded file

iPhone 5s, iOS 9.3.2

Posted on Jun 29, 2016 5:42 AM

Reply
3 replies

Jun 29, 2016 11:32 AM in response to Super kanin

Hi Kanin,


The error is that you are attempting to add two durations and a number. You need to ensure that the value in each of the cells to be summed is a Duration. The revised formula will do that.


Existing formula: =C2-B2

Replace with: =IF(OR(LEN(B)<1,LEN(C)<1),DURATION(,,,0),C-B)


The formula says: If cell B or cell C is empty, the result is 0m (zero minutes), otherwise, the result is C-B.


Note: Numbers is 'smart' enough to recognize when 'B' means 'all of column B' and when 'B' means 'the single cell in this row of column B', which is why I've left the 2 off of each of the four cell references in this formula.


Regards,

Barry

Jun 30, 2016 1:17 PM in response to Super kanin

Hi Kanin,


D2 worked before because you had Date/Time values in B2 and C2. It would also have worked when B2 and C2 were empty, but would have produced a result of 0 (a number)


What result do you see in D9? If it is an error triangle, what is the error message? (click once on the triangle to show the message)

I notice what's displayed in D9 does not start with an = sign. Did you enter one before entering the formula?


Your formulas are being displayed as text. Displaying them with the formatting applied in the Formula Editor is more useful, as the display shows whether Numbers is recognizing all parts of the formula. When you double click on a cell containing a formula, the formula is displayed in the formula Editor, and should look like this:

User uploaded file

Note that this display also shows the result produced by the formula, which can also be useful information.


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help!!! Caculate working hours.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.